DAY17:A Needle in the Haystack


Posted by birdbirdmurmur on 2023-07-31

題目連結

A Needle in the Haystack

解法

function findNeedle(haystack) {
  return "found the needle at position " + haystack.indexOf("needle");
}

筆記

如何快速找到陣列中的索引? indexOf()
直接返回字串


#javascript #Codewars #indexOf







Related Posts

【React Router】初次認識 React Router:基本使用

【React Router】初次認識 React Router:基本使用

滲透測試基本技術 第三章 (001)

滲透測試基本技術 第三章 (001)

一、Node.js介紹

一、Node.js介紹


Comments